<!DOCTYPE html>
<html lang="zh">
    <head></head>
    <body class="hold-transition sidebar-mini">
        <div class="wrapper">
            <nav class="main-header navbar navbar-expand bg-white navbar-light border-bottom"></nav>
            <aside class="main-sidebar sidebar-dark-primary elevation-4"></aside>
            <div class="content-wrapper">
                <div class="content-header">
                    <div class="container-fluid"></div>
                </div>
                <div id="content-panel" class="content">
                    <div class="container-fluid">
                        <div class="card card-primary card-outline">
                            <div class="card-header">
                                <h3 class="card-title">评论管理</h3>
                            </div>
                            <div class="card-body">
                                <div class="grid-btn">
                                    <button class="btn btn-success" onclick="checkDoneComments()"><i
                                            class="fa fa-check"></i>&nbsp;批量审核
                                    </button>
                                    <button class="btn btn-info" onclick="reply()"><i
                                            class="fa fa-reply"></i>&nbsp;回复
                                    </button>
                                    <button class="btn btn-danger" onclick="deleteComments()"><i
                                            class="fa fa-trash-o"></i>&nbsp;批量删除
                                    </button>
                                </div>
                                <!-- JqGrid必要DOM,用于创建表格展示列表数据 -->
                                <table id="comment-jqGrid" class="table table-bordered"></table>
                                <!-- JqGrid必要DOM,分页信息区域 -->
                                <div id="comment-jqGridPager"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <footer class="main-footer"></footer>
        </div>
        <script src="/admin/plugins/jquery.min.js"></script>

        <script src="/admin/plugins/js.cookie.min.js"></script>

        <script src="/admin/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>

        <script src="/admin/plugins/adminlte/adminlte.min.js"></script>

        <script src="/admin/plugins/jquery-ui.min.js"></script>

        <script src="/admin/plugins/editormd/editormd.min.js"></script>

        <script src="/admin/plugins/tagsinput/jquery.tagsinput.min.js"></script>

        <script src="/admin/plugins/select2/select2.full.min.js"></script>

        <script src="/admin/plugins/ajaxupload.js"></script>

        <script src="/admin/plugins/layer/layer.js"></script>

        <script src="/admin/plugins/jqgrid-5.3.0/jquery.jqGrid.min.js"></script>
        <script src="/admin/plugins/jqgrid-5.3.0/grid.locale-cn.js"></script>

        <script src="/admin/dist/js/public.js"></script>
        <script src="/admin/dist/js/base.js"></script>

        <script>
            $(function () {
                // 加载head标签内容
                $("head").load("/admin/templates/head.html");
                $("nav").load("/admin/templates/navigation.html");
                $("aside").load("/admin/templates/sidebar.html", function () {
                    let name = Cookies.get("nickName");
                    $("#userNick").text(name);
                    clearActive();
                    $("#ul-item-4").attr("class", "nav-link active");
                });
                $("footer").load("/admin/templates/footer.html");
                getCommentList();
                // 自动宽度
                $(window).resize(function () {
                    $("#comment-jqGrid").setGridWidth($(".card-body").width());
                });
            });
        </script>
    </body>
</html>